home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / nihcl-30.lha / nihcl-3.0 / ex / Shape.c < prev    next >
C/C++ Source or Header  |  1990-05-15  |  1KB  |  40 lines

  1. // Shape.c -- Abstract geometric shape class
  2.  
  3. #include "Shape.h"
  4. #include "nihclIO.h"
  5.  
  6. #define THIS Shape
  7. #define BASE Object
  8. #define BASE_CLASSES Object::desc()
  9. #define MEMBER_CLASSES Point::desc()
  10. #define VIRTUAL_BASE_CLASSES
  11.  
  12. DEFINE_ABSTRACT_CLASS(Shape,1,"$Header: /afs/alw.nih.gov/unix/sun4_40c/usr/local/src/nihcl-3.0/share/ex/RCS/Shape.c,v 3.0 90/05/15 22:44:04 kgorlen Rel $",NULL,NULL);
  13.  
  14. TransformStack TransformStack::transform;
  15.                     // shape translation stack
  16.  
  17. const Class* Shape::species() const     { return &classDesc; }
  18.  
  19. void Shape::deepenShallowCopy()
  20.      { org.deepenShallowCopy(); }
  21.  
  22. Shape::Shape(OIOin& strm) : Object(strm),org(strm) {}
  23.  
  24. void Shape::storer(OIOout& strm) const
  25. {
  26.     Object::storer(strm);
  27.     org.storeMemberOn(strm);
  28. }
  29.  
  30. Shape::Shape(OIOifd& fd) : Object(fd),org(fd) {}
  31.  
  32. void Shape::storer(OIOofd& fd) const
  33. {
  34.     Object::storer(fd);
  35.     org.storeOn(fd);
  36. }
  37.  
  38. int Shape::compare(const Object&) const
  39.        { shouldNotImplement("compare"); return 0; }
  40.